<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:c="http://java.sun.com/jsp/jstl/core"
	xmlns:ui="http://java.sun.com/jsf/facelets">
<body>

<ui:composition template="/template/template.xhtml">

	<ui:define name="title">Salvar Usuario</ui:define>

	<ui:define name="body">
		<h:form id="form">
			<h:panelGrid columns="3" width="50%">
				
				<h:panelGrid columns="1" >
					<h:outputLabel for="login" id="label1" value="login:"></h:outputLabel>
					<h:inputText id="login"
						value="#{crudUsuario.usuarioTO.login}" styleClass="tamanhoMedio" />
				</h:panelGrid>
				
				<h:panelGrid columns="1">
					<h:outputLabel for="status" id="label2" value="Status:"></h:outputLabel>
					<h:selectOneMenu id="status" value="#{crudUsuario.statusValue}" styleClass="tamanhoMedio">
						<f:selectItems value="#{crudUsuario.listaStatus}" />
					</h:selectOneMenu>
				</h:panelGrid>

				<h:panelGrid columns="1">
					<h:outputLabel for="cliente" id="label2" value="Cliente: "></h:outputLabel>
					<h:selectOneMenu id="cliente" value="" styleClass="tamanhoMedio">
						<f:selectItem itemLabel="- Selecione - "/>
					</h:selectOneMenu>
				</h:panelGrid>

				<h:panelGrid columns="1">
					<h:outputLabel for="senha1" id="label4" value="Senha: "></h:outputLabel>
					<h:inputSecret id="senha1" styleClass="tamanhoMedio" value="#{crudUsuario.senha1}" />
				</h:panelGrid>
				
				<h:panelGrid columns="1">
					<h:outputLabel for="senha2" id="label5" value="Repetir Senha: "></h:outputLabel>
					<h:inputSecret id="senha2" styleClass="tamanhoMedio" value="#{crudUsuario.senha2}" />
				</h:panelGrid>
				
				<h:panelGrid columns="1">
					<h:outputLabel for="dataExpiracao" id="label3" value="Data Expiracao: "></h:outputLabel>
					<h:inputText id="dataExpiracao" styleClass="tamanhoMedio" value="#{crudUsuario.usuarioTO.dataExpirar}">
						 <f:convertDateTime pattern="dd/MM/yyyy"/>
					</h:inputText>
				</h:panelGrid>
				
				<h:commandButton value="salvar" action="#{crudUsuario.salvar}" styleClass="button"/>

			</h:panelGrid>
		</h:form>
	</ui:define>

</ui:composition>

</body>
</html>